function getBudgetForCountry(countryId){
    document.getElementById("country").value=countryId;
    document.getElementById('formHidden').submit();
}

function validate() {
/*    jQuery.validator.addMethod("isDate", function(value, element){
        var retorno = false;
        if(value == '')
            retorno = true;
        else
            retorno = value.match(/^\d\d?\/\d\d?\/\d\d$/);
        return retorno;
    }, "Please enter date in the format dd/mm/yy");*/

    setEmptyDates();

    $("#formBudget")
        .validate(
        {
            rules : {
                'countryId' : "required",
/*                'budget.received': {
                    required: true,
                    isDate: true
                },*/
                'sbwInitial': {
                    required: true,
                    number: true
                },
/*                'budget.dateRevised': {
                    isDate: true
                },
                'budget.dateFinal': {
                    isDate: true
                },*/
                'sbwRevised': {
                    number: true
                },
                'sbwFinal': {
                    number: true
                }
            },

            errorElement : "label"
        })


}